;; ---------------------------------------------------------------------------------------
;; ---------------------------------------------------------------------------------------
;; ETIQUETAS
;; ---------------------------------------------------------------------------------------
;; ---------------------------------------------------------------------------------------
TIME			EQU	15536	; 65536 - 50000	

;; ---------------------------------------------------------------------------------------
;; VARIABLES DE LA RAM
;; ---------------------------------------------------------------------------------------

;; --------------------
;; MEMORIA DE BIT
;; --------------------

ACTUALIZAR_DISTANCIA BIT	001H
MEDICION_REALIZADA	BIT	002H
MEDICION_PENDIENTE	BIT	003H
MEDICION_ESTADO		BIT	004H

	
;; --------------------
;; MEMORIA
;; --------------------
DIST_DCHA_L			IDATA	0030H
DIST_DCHA_H			IDATA	0031H

DIST_DELANTE_L			IDATA	0032H
DIST_DELANTE_H			IDATA	0033H	

DIST_L				IDATA	0034H
DIST_H				IDATA	0035H

COUNT_OJO			IDATA	0036H
;; -----------------------------------------------------------------------------------------------
;; CONSTANTES 
;; -----------------------------------------------------------------------------------------------
PWM_TIME			EQU	65513	; 65536 - 25	
COUNT_OJO_TIME			EQU	10
SENSOR_LIMITE			EQU	04AH
SENSOR_MINIMA_DIST_DELANTE	EQU	032H
SENSOR_MINIMA_DIST_DERECHA	EQU	032H
SENSOR_MAXIMA_DIST_DERECHA	EQU	0A0H

;; -----------------------------------------------------------------------------------------------
;; PUERTOS/"PATILLAS"
;; -----------------------------------------------------------------------------------------------
 

;; lcd
DAT			EQU	P2	
RS			EQU	P2.1
RW			EQU	P2.2
EN			EQU	P2.3
DB4		 	EQU 	P2.4
DB5			EQU 	P2.5
DB6			EQU 	P2.6
DB7			EQU 	P2.7


			;; controlador de servos
MEN	BIT	P1.0
D1	BIT	P1.1
D2	BIT	P1.2
M1	BIT	P1.3
M2	BIT	P1.4
M3	BIT	P1.5


PUERTO_SENSOR	EQU	P3.4